import { useParams, useSearchParams,useLocation } from "react-router-dom";
import { useEffect } from "react";
const Detail = ()=>{
    const params = useParams();
    const [search,setSearch] = useSearchParams()
    const location = useLocation()

    useEffect(()=>{
        // 不要在useEffect里面调用另外的hook
        console.log('得到的 params参数',params )
        console.log('得到的 search参数', search);
        console.log('query当中a的值', search.get('a'));
        console.log('query当中b的值', search.get('b'));
        console.log('一个路由的location',location)
    },[])

    return (
        <div>我是详情页面</div>
    )
}

export default Detail;